package gameAppLayer.stateMachine.testState;

import gameAppLayer.CombatInitData;
import gameAppLayer.ExternalData;
import gameAppLayer.GameSettings;
import gameAppLayer.RootNodePortal;
import gameAppLayer.stateMachine.GameState;

import org.bushe.swing.event.Logger;
import org.bushe.swing.event.Logger.Level;

import testClasses.StarSystemSandbox;

import com.jme3.input.InputManager;
import com.jme3.renderer.Camera;
import com.jme3.scene.Node;

public class TestStateBuilder {
	
	private static final Logger logger = Logger.getLogger(TestStateBuilder.class.getName());
	
	public TestStateBuilder(){}
	
	public GameState createGameState(
			String testName,
			GameSettings settings,
			CombatInitData initData,
			InputManager inputManager,
			Camera cam,
			ExternalData externalData) {
		
		logger.log(Level.INFO, "createGameState() entered");
		
		GameState testState = null;;
		
		if (testName.equalsIgnoreCase("StarSystemSandbox")) {
			testState = new StarSystemSandbox(inputManager, externalData, cam);
		}
		else if (testName.equalsIgnoreCase("blank2")) {
			//load specific test
		}
		//etc...
		
		
		//Each test loads up its own full camera, etc.  Just pass in cam. 		
//		TestState testState = new TestState(inputManager, cam);
		
		/*
		 * Add relevant test to be run
		 * 
		 * Each test fully defines what it needs to run, including camera.
		 * Just add one test here, maintain full list elsewhere and be able
		 * to choose between tests in list.
		 */
		
		//Move this code into any tests that use camera (all of them...)
//		Node camNode = new Node("TestCamera");
//		realCam.setSpatial(camNode);
//		RootNodePortal.attachChild(camNode);
		
		
		
		return testState;
		
	}

}
